<template>
  <div class="son-con">子组件{{ sonParam }}
    <GrandSon></GrandSon>
  </div>
</template>

<script>
import GrandSon from "./GrandSon.vue";
export default {
  components: {
    GrandSon,
  },
  inject:['sonParam']
};
</script>

<style>
.son-con {
  width: 500px;
  height: 300px;
  background-color: aqua;
}
</style>